/******************************************************************************
//             INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in accordance with the terms of that agreement.
//        Copyright (c) 2000 Intel Corporation. All Rights Reserved.
//
//  VSS: 
//     $Workfile:  $
//     $Revision:  $
//     $Date:      $
//     $Archive:   $
//
//  Description:
//      Intel(R) Integrated Performance Primitives - JPEG header file.
//      This file contains internal macro definitions.
//
//  History:
//     Date        Author        Changes
//     2000/5/14   Jerry Hu      Created  (version 0.1)
//     2001/2/14   Jerry Hu      Modified (version 0.2, add alignment check)
//
******************************************************************************/
#ifndef __IPPJPEG_H_
#define __IPPJPEG_H_

#include "_ippdefs.h"
#include "ippjp.h"

#define _IPP_32BYTEALIGN(adr) (((((unsigned int)(adr))+31)&(~31)))
#define _IPP_CLIP_8U(x) ((Ipp8u)((x)>255?255:(((x)<0)?0:(x))))
#define _IPP_CHECK_ALIGN_4BYTE(x) (0==(((unsigned int )(x))&3))
#define _IPP_CHECK_ALIGN_2BYTE(x) (0==(((unsigned int )(x))&1))

#define _IPP_SHIFTLEVEL_16S8U(x) ( (Ipp8u)( ((x)<-128)?0:(((x)>127)?255:((x)+128)) ) )
#define _IPP_SHIFTLEVEL_8U16S(x) ((Ipp16s)((int)(x)-128))

extern const Ipp8u _nIppIZigZagIndex[64];

#endif

/* EOF */
